package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.*;
import com.sky.entity.Orders;
import com.sky.vo.DishTopVO;
import com.sky.vo.Nothing;
import com.sky.vo.OrderVO;
import com.sky.vo.ReportVO;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDate;
import java.util.Arrays;
import java.util.List;

@Mapper
public interface OrderMapper {
    Integer submitOrder(Orders orders);

    Page<OrderVO> historyOrders(OrdersPageQueryDTO ordersPageQueryDTO);

    OrderVO findOrderById(Long id);

    Integer cancelOrder(Long id ,Integer status);

    Page<OrderVO> findOrders(OrdersPageQueryDTO ordersPageQueryDTO);

    List<Nothing> statistics();

    Integer confirm(OrdersConfirmDTO ordersConfirmDTO);

    Integer rejection(OrdersRejectionDTO ordersRejectionDTO);

    Integer upderOrder(OrdersCancelDTO ordersCancelDTO);

    List<ReportVO> turnoverStatistics(List<LocalDate> date);

    Integer totalOrderNum( List<LocalDate> date);

    List<ReportVO> orderCountList(List<LocalDate> date);

    Integer validOrderCount(List<LocalDate> date);



    List<ReportVO> validOrderCountList(List<LocalDate> date);

    List<ReportVO> turnoverSt(List<LocalDate> date);

    List<DishTopVO> top(TurnoverReportDTO turnoverReportDTO);

    List<ReportVO> seletUser(List<LocalDate> date);

    Long seleAlltUser(LocalDate date);

    Integer changeOrderNotPay( Orders order);

    Integer changeOrders();

    Orders getByNumberAndUserId(String outTradeNo, Long userId);

    void update(Orders orders);

    Integer findTodayOrders(Integer status);
}
